package com.matt.controller.web.course;

import com.matt.domain.course.ChildrenMonthRecord;
import com.matt.repository.course.ChildrenMonthRecordRepository;
import com.starinside.wp.foundation.model.StatusResponse;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RestController
@RequestMapping("/api/children_month_record")
@Slf4j
@Api(tags = "学生 - 月报")
public class ChildrenMonthRecordController {

    @Autowired
    private ChildrenMonthRecordRepository childrenMonthRecordRepository;




    @ApiOperation(value = "查询")
    @PostMapping("/getId")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "id", value = "记录ID", required = true, dataType = "string"),
    })
    @ApiResponses({
            @ApiResponse(code = 000000, message = "successful", response = ChildrenMonthRecord.class),
    })
    public StatusResponse getId( String id) {
        ChildrenMonthRecord childrenMonthRecord1 = childrenMonthRecordRepository.getOne( id);
        return StatusResponse.success(childrenMonthRecord1);
    }


}
